package com.lagou;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;

public class MyMessageListener implements ChannelAwareMessageListener {

    @Override
    public void onMessage(Message message, Channel channel) {
        System.out.println(channel + ":" + Thread.currentThread().getName() + ":" + new String(message.getBody()));
    }

}
